3.1.40 \(\int \sec ^8(c+d x) (a+a \sin (c+d x))^3 \, dx\) [40]

Optimal. Leaf size=99 \[ \frac {3 a^3 \sec ^5(c+d x)}{35 d}+\frac {2 a \sec ^7(c+d x) (a+a \sin (c+d x))^2}{7 d}+\frac {3 a^3 \tan (c+d x)}{7 d}+\frac {2 a^3 \tan ^3(c+d x)}{7 d}+\frac {3 a^3 \tan ^5(c+d x)}{35 d} \]

[Out]

3/35*a^3*sec(d*x+c)^5/d+2/7*a*sec(d*x+c)^7*(a+a*sin(d*x+c))^2/d+3/7*a^3*tan(d*x+c)/d+2/7*a^3*tan(d*x+c)^3/d+3/
35*a^3*tan(d*x+c)^5/d

________________________________________________________________________________________

Rubi [A]
time = 0.06, antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2755, 2748, 3852} \begin {gather*} \frac {3 a^3 \tan ^5(c+d x)}{35 d}+\frac {2 a^3 \tan ^3(c+d x)}{7 d}+\frac {3 a^3 \tan (c+d x)}{7 d}+\frac {3 a^3 \sec ^5(c+d x)}{35 d}+\frac {2 a \sec ^7(c+d x) (a \sin (c+d x)+a)^2}{7 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^8*(a + a*Sin[c + d*x])^3,x]

[Out]

(3*a^3*Sec[c + d*x]^5)/(35*d) + (2*a*Sec[c + d*x]^7*(a + a*Sin[c + d*x])^2)/(7*d) + (3*a^3*Tan[c + d*x])/(7*d)
 + (2*a^3*Tan[c + d*x]^3)/(7*d) + (3*a^3*Tan[c + d*x]^5)/(35*d)

Rule 2748

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-b)*((g*Co
s[e + f*x])^(p + 1)/(f*g*(p + 1))), x] + Dist[a, Int[(g*Cos[e + f*x])^p, x], x] /; FreeQ[{a, b, e, f, g, p}, x
] && (IntegerQ[2*p] || NeQ[a^2 - b^2, 0])

Rule 2755

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Simp[-2*b*(
g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m - 1)/(f*g*(p + 1))), x] + Dist[b^2*((2*m + p - 1)/(g^2*(p + 1
))), Int[(g*Cos[e + f*x])^(p + 2)*(a + b*Sin[e + f*x])^(m - 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2
 - b^2, 0] && GtQ[m, 1] && LtQ[p, -1] && IntegersQ[2*m, 2*p]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin {align*} \int \sec ^8(c+d x) (a+a \sin (c+d x))^3 \, dx &=\frac {2 a \sec ^7(c+d x) (a+a \sin (c+d x))^2}{7 d}+\frac {1}{7} \left (3 a^2\right ) \int \sec ^6(c+d x) (a+a \sin (c+d x)) \, dx\\ &=\frac {3 a^3 \sec ^5(c+d x)}{35 d}+\frac {2 a \sec ^7(c+d x) (a+a \sin (c+d x))^2}{7 d}+\frac {1}{7} \left (3 a^3\right ) \int \sec ^6(c+d x) \, dx\\ &=\frac {3 a^3 \sec ^5(c+d x)}{35 d}+\frac {2 a \sec ^7(c+d x) (a+a \sin (c+d x))^2}{7 d}-\frac {\left (3 a^3\right ) \text {Subst}\left (\int \left (1+2 x^2+x^4\right ) \, dx,x,-\tan (c+d x)\right )}{7 d}\\ &=\frac {3 a^3 \sec ^5(c+d x)}{35 d}+\frac {2 a \sec ^7(c+d x) (a+a \sin (c+d x))^2}{7 d}+\frac {3 a^3 \tan (c+d x)}{7 d}+\frac {2 a^3 \tan ^3(c+d x)}{7 d}+\frac {3 a^3 \tan ^5(c+d x)}{35 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 134, normalized size = 1.35 \begin {gather*} \frac {13 a^3 \sec ^7(c+d x)}{35 d}+\frac {a^3 \sec ^6(c+d x) \tan (c+d x)}{d}+\frac {a^3 \sec ^5(c+d x) \tan ^2(c+d x)}{5 d}-\frac {a^3 \sec ^4(c+d x) \tan ^3(c+d x)}{d}+\frac {4 a^3 \sec ^2(c+d x) \tan ^5(c+d x)}{5 d}-\frac {8 a^3 \tan ^7(c+d x)}{35 d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^8*(a + a*Sin[c + d*x])^3,x]

[Out]

(13*a^3*Sec[c + d*x]^7)/(35*d) + (a^3*Sec[c + d*x]^6*Tan[c + d*x])/d + (a^3*Sec[c + d*x]^5*Tan[c + d*x]^2)/(5*
d) - (a^3*Sec[c + d*x]^4*Tan[c + d*x]^3)/d + (4*a^3*Sec[c + d*x]^2*Tan[c + d*x]^5)/(5*d) - (8*a^3*Tan[c + d*x]
^7)/(35*d)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(216\) vs. \(2(89)=178\).
time = 0.19, size = 217, normalized size = 2.19

method result size
risch \(-\frac {16 \left (-6 a^{3} {\mathrm e}^{i \left (d x +c \right )}+i a^{3}+14 a^{3} {\mathrm e}^{3 i \left (d x +c \right )}-14 i a^{3} {\mathrm e}^{2 i \left (d x +c \right )}\right )}{35 \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )^{7} \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) d}\) \(84\)
derivativedivides \(\frac {a^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )+3 a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+\frac {3 a^{3}}{7 \cos \left (d x +c \right )^{7}}-a^{3} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )}{d}\) \(217\)
default \(\frac {a^{3} \left (\frac {\sin ^{4}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {3 \left (\sin ^{4}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{4}\left (d x +c \right )}{35 \cos \left (d x +c \right )}-\frac {\left (2+\sin ^{2}\left (d x +c \right )\right ) \cos \left (d x +c \right )}{35}\right )+3 a^{3} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )+\frac {3 a^{3}}{7 \cos \left (d x +c \right )^{7}}-a^{3} \left (-\frac {16}{35}-\frac {\left (\sec ^{6}\left (d x +c \right )\right )}{7}-\frac {6 \left (\sec ^{4}\left (d x +c \right )\right )}{35}-\frac {8 \left (\sec ^{2}\left (d x +c \right )\right )}{35}\right ) \tan \left (d x +c \right )}{d}\) \(217\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^8*(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/d*(a^3*(1/7*sin(d*x+c)^4/cos(d*x+c)^7+3/35*sin(d*x+c)^4/cos(d*x+c)^5+1/35*sin(d*x+c)^4/cos(d*x+c)^3-1/35*sin
(d*x+c)^4/cos(d*x+c)-1/35*(2+sin(d*x+c)^2)*cos(d*x+c))+3*a^3*(1/7*sin(d*x+c)^3/cos(d*x+c)^7+4/35*sin(d*x+c)^3/
cos(d*x+c)^5+8/105*sin(d*x+c)^3/cos(d*x+c)^3)+3/7*a^3/cos(d*x+c)^7-a^3*(-16/35-1/7*sec(d*x+c)^6-6/35*sec(d*x+c
)^4-8/35*sec(d*x+c)^2)*tan(d*x+c))

________________________________________________________________________________________

Maxima [A]
time = 0.31, size = 122, normalized size = 1.23 \begin {gather*} \frac {{\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} a^{3} + {\left (5 \, \tan \left (d x + c\right )^{7} + 21 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3} + 35 \, \tan \left (d x + c\right )\right )} a^{3} - \frac {{\left (7 \, \cos \left (d x + c\right )^{2} - 5\right )} a^{3}}{\cos \left (d x + c\right )^{7}} + \frac {15 \, a^{3}}{\cos \left (d x + c\right )^{7}}}{35 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/35*((15*tan(d*x + c)^7 + 42*tan(d*x + c)^5 + 35*tan(d*x + c)^3)*a^3 + (5*tan(d*x + c)^7 + 21*tan(d*x + c)^5
+ 35*tan(d*x + c)^3 + 35*tan(d*x + c))*a^3 - (7*cos(d*x + c)^2 - 5)*a^3/cos(d*x + c)^7 + 15*a^3/cos(d*x + c)^7
)/d

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 112, normalized size = 1.13 \begin {gather*} \frac {8 \, a^{3} \cos \left (d x + c\right )^{4} - 36 \, a^{3} \cos \left (d x + c\right )^{2} + 15 \, a^{3} + 4 \, {\left (6 \, a^{3} \cos \left (d x + c\right )^{2} - 5 \, a^{3}\right )} \sin \left (d x + c\right )}{35 \, {\left (3 \, d \cos \left (d x + c\right )^{3} - 4 \, d \cos \left (d x + c\right ) - {\left (d \cos \left (d x + c\right )^{3} - 4 \, d \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/35*(8*a^3*cos(d*x + c)^4 - 36*a^3*cos(d*x + c)^2 + 15*a^3 + 4*(6*a^3*cos(d*x + c)^2 - 5*a^3)*sin(d*x + c))/(
3*d*cos(d*x + c)^3 - 4*d*cos(d*x + c) - (d*cos(d*x + c)^3 - 4*d*cos(d*x + c))*sin(d*x + c))

________________________________________________________________________________________

Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**8*(a+a*sin(d*x+c))**3,x)

[Out]

Exception raised: SystemError >> excessive stack use: stack is 6190 deep

________________________________________________________________________________________

Giac [A]
time = 4.50, size = 138, normalized size = 1.39 \begin {gather*} -\frac {\frac {35 \, a^{3}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1} + \frac {525 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{6} - 1960 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 4025 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 4480 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3143 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1176 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 243 \, a^{3}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1\right )}^{7}}}{280 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^8*(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/280*(35*a^3/(tan(1/2*d*x + 1/2*c) + 1) + (525*a^3*tan(1/2*d*x + 1/2*c)^6 - 1960*a^3*tan(1/2*d*x + 1/2*c)^5
+ 4025*a^3*tan(1/2*d*x + 1/2*c)^4 - 4480*a^3*tan(1/2*d*x + 1/2*c)^3 + 3143*a^3*tan(1/2*d*x + 1/2*c)^2 - 1176*a
^3*tan(1/2*d*x + 1/2*c) + 243*a^3)/(tan(1/2*d*x + 1/2*c) - 1)^7)/d

________________________________________________________________________________________

Mupad [B]
time = 4.86, size = 228, normalized size = 2.30 \begin {gather*} \frac {2\,a^3\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (13\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-43\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )+77\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-7\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-105\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+175\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-105\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+35\,{\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\right )}{35\,d\,{\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}^7\,\left (\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(c + d*x))^3/cos(c + d*x)^8,x)

[Out]

(2*a^3*cos(c/2 + (d*x)/2)*(13*cos(c/2 + (d*x)/2)^7 + 35*sin(c/2 + (d*x)/2)^7 - 105*cos(c/2 + (d*x)/2)*sin(c/2
+ (d*x)/2)^6 - 43*cos(c/2 + (d*x)/2)^6*sin(c/2 + (d*x)/2) + 175*cos(c/2 + (d*x)/2)^2*sin(c/2 + (d*x)/2)^5 - 10
5*cos(c/2 + (d*x)/2)^3*sin(c/2 + (d*x)/2)^4 - 7*cos(c/2 + (d*x)/2)^4*sin(c/2 + (d*x)/2)^3 + 77*cos(c/2 + (d*x)
/2)^5*sin(c/2 + (d*x)/2)^2))/(35*d*(cos(c/2 + (d*x)/2) - sin(c/2 + (d*x)/2))^7*(cos(c/2 + (d*x)/2) + sin(c/2 +
 (d*x)/2)))

________________________________________________________________________________________